package com.ocm.tourism.core.model;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

public class UserInfo implements UserDetails {

   
   /**
    * 
    */
   private static final long serialVersionUID = 1L;

   private Collection<? extends GrantedAuthority> grantedAuthorities;
   
   private String password;
   
   private String username;
   
   private boolean accountNonExpired;
   
   private boolean accountNonLocked;
   
   private boolean credentialsNonExpired;
   
   private boolean enabled;

   private long participantId ;

   private Long avatarId ;

   private String displayName;

   @Override
   public Collection<? extends GrantedAuthority> getAuthorities() {
      return grantedAuthorities;
   }

   @Override
   public String getPassword() {
      return password;
   }

   @Override
   public String getUsername() {
      return username;
   }

   @Override
   public boolean isAccountNonExpired() {
      return accountNonExpired;
   }

   @Override
   public boolean isAccountNonLocked() {
      return accountNonLocked;
   }

   @Override
   public boolean isCredentialsNonExpired() {
      return credentialsNonExpired;
   }

   @Override
   public boolean isEnabled() {
      return enabled;
   }

   public Collection<? extends GrantedAuthority> getGrantedAuthorities() {
      return grantedAuthorities;
   }

   public void setGrantedAuthorities(Collection<? extends GrantedAuthority> grantedAuthorities) {
      this.grantedAuthorities = grantedAuthorities;
   }

   public void setPassword(String password) {
      this.password = password;
   }

   public void setUsername(String username) {
      this.username = username;
   }

   public void setAccountNonExpired(boolean accountNonExpired) {
      this.accountNonExpired = accountNonExpired;
   }

   public void setAccountNonLocked(boolean accountNonLocked) {
      this.accountNonLocked = accountNonLocked;
   }

   public void setCredentialsNonExpired(boolean credentialsNonExpired) {
      this.credentialsNonExpired = credentialsNonExpired;
   }

   public void setEnabled(boolean enabled) {
      this.enabled = enabled;
   }

   public long getParticipantId() {
      return participantId;
   }

   public void setParticipantId(long participantId) {
      this.participantId = participantId;
   }

   public Long getAvatarId() {
      return avatarId;
   }

   public void setAvatarId(Long avatarId) {
      this.avatarId = avatarId;
   }

   public String getDisplayName() {
      return displayName;
   }

   public void setDisplayName(String displayName) {
      this.displayName = displayName;
   }
}
